<?php
/**
 * Created by PhpStorm.
 * User: arkin
 * Date: 5/19/15
 * Time: 7:29 PM
 */

$arr1 = array(
    '乌鲁木齐' => array(
        'Web' => 10,
        'App' => 20,

    ),
    '昌吉' => array(
        'Web' => 130,
        'App' => 842,
    )
);


$arr2 = array(
    '乌鲁木齐' => array(
        'Web' => 10,
        'App' => 20,
        'location' => "乌鲁木齐"

    ),
    '昌吉' => array(
        'Web' => 130,
        'App' => 842,
        'location' => "昌吉"

    )
);

$arr3=array();
foreach($arr1 as $key => $val){
    $location=array('location'=>$key);
    $val=array_merge($val,$location);
    $arr3[$key]=$val;
}

echo "<pre>";
print_r($arr3);


